﻿using System;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Input;

namespace WickedFlame.GenDock
{
    public class DockablePanel : Pane
    {
        static DockablePanel()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePanel), new FrameworkPropertyMetadata(typeof(DockablePanel)));
        }

        public override void AddContent(ContentDocument content)
        {
            throw new NotImplementedException();
        }

        #region Dependency properties

        private static object syncRoot = new object();

        public bool ShowHeader
        {
            get { return (bool)GetValue(ShowHeaderProperty); }
            set { SetValue(ShowHeaderProperty, value); }
        }

        // Using a DependencyProperty as the backing store for ActiveContent.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ShowHeaderProperty =
            DependencyProperty.Register("ShowHeader", typeof(bool), typeof(DockablePanel), new UIPropertyMetadata(true));

        //private static RoutedUICommand closeCommand = null;
        //public static RoutedUICommand CloseCommand
        //{
        //    get
        //    {
        //        lock (syncRoot)
        //        {
        //            if (null == closeCommand)
        //            {
        //                closeCommand = new RoutedUICommand("C_lose", "Close", typeof(DockablePanel));
        //            }
        //        }
        //        return closeCommand;
        //    }
        //}

        //private static RoutedUICommand autoHideCommand = null;
        //public static RoutedUICommand ToggleAutoHideCommand
        //{
        //    get
        //    {
        //        lock (syncRoot)
        //        {
        //            if (null == autoHideCommand)
        //            {
        //                autoHideCommand = new RoutedUICommand("A_utohide", "AutoHide", typeof(DockablePanel));
        //            }
        //        }
        //        return autoHideCommand;
        //    }
        //}

        #endregion
    }
}
